﻿@model IEnumerable<SIFIET.Models.Topic>

@{
    ViewBag.Title = "Temas";
    int rowIndex = 0;
}

<div class="grid">

    <div class="c12">
        <div class="c12 first">
            
            <h2>Temas</h2>
            
            <div class="alert success">@TempData["Create"]</div>
            <div class="alert success">@TempData["Update"]</div>
            <div class="alert success">@TempData["Delete"]</div>
            <br />
            <p>
                @Html.ActionLink("Nuevo Tema", "Create", null, htmlAttributes: new { @class = "ebutton blue"})
            </p>
        </div>
        <div class="c12">
            <div class="c7 first">
                <table>
                    <tr class="head">
                        <th>
                            Descripcion
                        </th>
                        <th></th>
                    </tr>

                    @foreach (var item in Model) {

                        if (rowIndex % 2 == 0) {
                            @:<tr>
                        } else { 
                            @:<tr class="even"> 
                        }
    
                        <td>
                            @Html.DisplayFor(modelItem => item.Description)
                        </td>
                        <td>
                            <div class="c12">

                                <div class="c1 first">
                          
                                    @Html.ActionLink(" ", "Edit", new { id = item.Id }, htmlAttributes: new { @class = "btnedit" })
                            
                                </div>
                                <div class="c1">
                                    @Html.ActionLink(" ", "Details", new { id = item.Id }, htmlAttributes: new { @class = "btndetails" })
                                </div>

                                <div class="c1 first">
                                    @Html.ActionLink(" ", "Delete", new { id = item.Id }, htmlAttributes: new { @class = "btndelete" })
                                </div>
                    
                                <div class="c1">
                                    <div class="boton">
                                        &#9660;                                       
                                        @*<img src="@Url.Content("~/Content/themes/base/images/more.png")"/>*@
                                        <div class="informa">
                                            <div class="contenido">
                                                <div class="arrow_box"></div>
                                                <div class="titulo">Más opciones</div>
                                                <ul>
                                                    <li class="lmenu">@Html.ActionLink("Crear Preguntas", "Index", "Questions", new { id = item.Id }, null) </li>
                                                </ul>	
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                            
                      
                        </td>
                        @:</tr>
                        rowIndex++;
                    }

                </table>
            </div>
            <div class="c2">
                
            </div>
            <div class="c3 last">
                @Html.Partial("_LayoutSideBar")
            </div>
        </div>

    </div>
    &nbsp;
</div>
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/menu.js")" type="text/javascript"></script>